#include "includes.h"


int main(void)
{
	uint8_t counter = 0;

// Initialization
	cli();

	UART_Init();		// initialize the UART
	SPI_MasterInit();	// initialize the SPI
	can_init();			// initialize the CAN
	PWM_init();			// initialize the servo
	shooter_init();		// initialize the shooter
	TWI_init();			// initialize the twi
	motor_init();		// initialize the motor
//	adc128_init();		// initialize the adc

	sei();

	//	Identify node
	USART_print("NODE2\r\n");

	while(TRUE)
	{
		can_interrupt();
		if(counter==200)
		{ 
		//	adc_poll();
			counter=0;
		}	
		else
		{
			_delay_us(200);
			counter++;
		}
	}
	return 0;
}
